package com.snow.useviewdemo.function2.radius;

import android.os.Bundle;

import androidx.drawerlayout.widget.DrawerLayout;

import com.snow.useviewdemo.R;
import com.snow.useviewdemo.base.BaseActivity;
import com.snow.useviewdemo.util.radius.RadiusTextView;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

import butterknife.BindView;
import butterknife.ButterKnife;

/**
 * author : snowzhao
 * e-mail : zyt@ttsing.com
 * date   : 2020/4/16
 * desc   :测试圆角控件
 */
public class RadiusViewTestActivity extends BaseActivity {
    @BindView(R.id.text_go_to_detail)
    RadiusTextView textGoToDetail;
    @BindView(R.id.view_progress)
    SpeedometerProgressView viewProgress;
    @BindView(R.id.cv_chartView)
    DrawLineView drawerLayout;
    private List<Integer> maxlist;

    @Override
    protected int getLayoutId() {
        return R.layout.activity_radius_view_test;
    }

    @Override
    protected void setViewData(Bundle savedInstanceState) {
        viewProgress.setMaxValue(100);
        viewProgress.setAnimTime(1000);
        viewProgress.setValue(55);
        initLineDatas();
    }

    private void initLineDatas() {
        maxlist = new ArrayList<>();
        float maxValueY = Collections.max(maxlist);
//        drawerLayout.setData(xdata, ydatas, maxValueY);
        drawerLayout.postInvalidate();
    }

}
